package com.google.code.task.example.resources;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.google.code.task.AbstractFluentTask;
import com.google.code.task.TaskResultType;

public class ToBeFailedTask extends AbstractFluentTask {
  private static final Log LOG = LogFactory.getLog(ToBeFailedTask.class);
  private int triedCount = 0;

  public TaskResultType execute() {
    LOG.info("Task is failed. Retried count is " + ++triedCount);
    return TaskResultType.FAILURE;
  }
}
